#ifndef MANAGEDATAWIDGET_H
#define MANAGEDATAWIDGET_H
#include <QWidget>
#include <QListWidget>
#include <QPushButton>
#include <QLabel>
#include <QLineEdit>
#include <QVBoxLayout>
#include <QGridLayout>
#include <QHBoxLayout>
#include <QSqlQuery>
#include <QMessageBox>
#include <QIntValidator>


class ManageDataWidget : public QWidget
{
    Q_OBJECT
public:
    explicit ManageDataWidget(QWidget *parent = 0);
private:
    QLabel* titleLabel;

    QWidget* verifyWidget;
    QLabel* verifyLabel;
    QLabel* usernameLabel;
    QLineEdit* usernameLineEdit;
    QLabel* passwordLabel;
    QLineEdit* passwordLineEdit;
    QPushButton* verifyOkButton;

    QWidget* manageWidget;
    QListWidget* idListWidget;  //listWidget
    QListWidget* nameListWidget;
    QListWidget* factoryListWidget;
    QListWidget* priceListWidget;
    QListWidget* sumListWidget;
    QListWidget* sellListWidget;
    QListWidget* lastListWidget;
    QLineEdit* idLineEdit;    //
    QLineEdit* nameLineEdit;
    QLineEdit* factoryLineEdit;
    QLineEdit* priceLineEdit;
    QLineEdit* sumLineEdit;
    QLineEdit* sellLineEdit;
    QLineEdit* lastLineEdit;
    QLabel* idLabel;
    QLabel* nameLabel;
    QLabel* factoryLabel;
    QLabel* priceLabel;
    QLabel* sumLabel;
    QLabel* sellLabel;
    QLabel* lastLabel;
    QPushButton* addButton;   //button
    QPushButton* deleteButton;
    QPushButton* changeButton;
    QPushButton* updateButton;
    QPushButton* quitButton;

private slots:
    void showListWidget();
    void slotVerifyOkButton();
    void slotVerifyLineEditTextChange();
    void initialize();
    void slotAddButton();
    void slotDeleteButton();
    void slotChangeButton();
    void slotQuitButton();
    void slotIdlineEditTextChange(QString);
    void slotNumberLienEditTextChange();
};

#endif // MANAGEDATAWIDGET_H
